Skip to content

[Workers] Document Wrangler auth profiles#31774

Open
MattieTK wants to merge 5 commits into
productionfrom
wrangler-auth-profiles
Open

[Workers] Document Wrangler auth profiles#31774
MattieTK wants to merge 5 commits into
productionfrom
wrangler-auth-profiles

Conversation

@MattieTK

@MattieTK MattieTK commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

Adds user-facing documentation for Wrangler authentication profiles (workers-sdk #14200, RFC #14161).

Profiles let you keep separate OAuth logins scoped to specific accounts and bind them to directories, so you can work across multiple Cloudflare accounts without re-running wrangler login — for example, a separate login per client at an agency, or account-separated staging and production with account_id as a failsafe.

This PR adds:

  • A new guide at /workers/wrangler/profiles/ covering when to use profiles, the resolution order, account selection, and the create / activate / switch / list / remove workflow.
  • A changelog entry (dated 2026-06-30) that summarises the use cases and links to the guide.
  • The wrangler auth command reference (auth create, auth activate, auth deactivate, auth list, auth delete) under the auth section in commands/general.mdx. These autogenerate from the installed wrangler package via experimental_getWranglerCommands() — including the --profile global flag and the "Experimental" badge.

To populate the autogenerated command reference, this PR bumps the wrangler devDependency to 4.106.0 (the release that ships profiles). Because that version was published within the repo's 24-hour minimumReleaseAge window, wrangler and its miniflare dependency are added to minimumReleaseAgeExclude in pnpm-workspace.yaml — the docs site bumps Wrangler frequently to regenerate command docs, so exempting these first-party packages from the age wait is intentional.

A full local build passes (8,550 pages), and the guide's per-command anchors (#auth-create, etc.) resolve against the autogenerated headings.

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes. (Tracked by RFC #14161.)

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
package.json @cloudflare/content-engineering
* @cloudflare/product-owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/product-owners
/src/content/docs/workers/wrangler/ @cloudflare/wrangler, @irvinebroque, @cloudflare/product-owners, @MattieTK, @vy-ton

@ask-bonk

ask-bonk Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Recommended labels: workers, wrangler, documentation, changelog

Summary

This PR adds user-facing documentation for Wrangler authentication profiles (shipping in Wrangler 4.106.0):

  • New guide: src/content/docs/workers/wrangler/profiles.mdx — a concept page covering profile resolution order, directory binding, account selection, and the create / activate / switch / list / remove workflow.
  • Changelog entry: src/content/changelog/workers/2026-06-30-wrangler-auth-profiles.mdx announcing the feature and linking to the guide.

Overall, the content is well-structured, provides practical examples (agency multi-client work and staging/production separation), and appropriately flags the beta status. Good work.


Issues that need attention before merge

1. Grammar typo in profiles.mdx (line 11) 🔴
The opening sentence is missing a conjunction.

- A profile is a named OAuth login that you scope to a chosen set of accounts can bind to a directory.
+ A profile is a named OAuth login that you scope to a chosen set of accounts and bind to a directory.

2. Pre-merge dependency: Wrangler version bump 🔴
As noted in the PR description, the wrangler devDependency must be bumped to 4.106.0 and the <WranglerCommand> entries for auth create, auth activate, auth deactivate, auth list, and auth delete must be added to commands/general.mdx before this merges. Without that bump, the command reference anchor exists but the specific commands won't render.

3. Changelog date confirmation 🔴
The changelog date is set to 2026-06-30. This should be updated to match the actual 4.106.0 release date before merge.

4. Consider adding sidebar.order
The new guide does not set a sidebar.order. Without one, it will be sorted alphabetically among the Wrangler pages. If it should appear in a specific position (e.g., near Install/Update or Configuration), add an explicit sidebar: order: N to the frontmatter.

5. <Steps> usage for priority lists
The Resolution order and Account selection sections use the <Steps> component for declarative priority lists rather than procedural instructions. The style guide typically reserves <Steps> for sequential actions ("Do X, then do Y"). Consider using a regular numbered markdown list for these two sections, or rephrasing the items as imperative steps.

6. Unchecked documentation checklist item
The third checklist item ("If a larger change … an issue has been opened …") is unchecked, with a note that it is tracked by RFC #14161. If maintainers are satisfied that the RFC is sufficient, this is fine.


Verdict

Approve after addressing items 1–3 (grammar fix, wrangler bump, and date confirmation). The rest are optional suggestions.

github run

@irvinebroque irvinebroque left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 👏 👏

stamp so you have it, see comments

worth considering calling out in blog too (but not blocking on blog)

Comment thread src/content/changelog/workers/2026-06-30-wrangler-auth-profiles.mdx Outdated
Comment thread src/content/changelog/workers/2026-06-30-wrangler-auth-profiles.mdx

A profile is a named OAuth login that you scope to a chosen set of accounts and bind to a directory. Commands run in that directory, and its subdirectories, use the matching account automatically.

Use profiles to keep a separate login for each client when working at an agency, or to separate staging and production into different accounts. Pair a profile with an `account_id` in your [Wrangler configuration file](/workers/wrangler/configuration/) so a command cannot reach the wrong account.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dinasaur404 for blog re: FGA

Comment thread src/content/changelog/workers/2026-06-30-wrangler-auth-profiles.mdx
@MattieTK MattieTK marked this pull request as ready for review July 1, 2026 20:41
@MattieTK MattieTK requested review from a team and vy-ton as code owners July 1, 2026 20:41
@MattieTK MattieTK requested a review from edmundhung July 1, 2026 20:41
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 1 warning, 💡 1 suggestion found in commit 314e46b.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

No code review issues found.

Conventions

Checks PR title, description, and redirect checklist.

No convention issues found.

Style Guide Review

Warnings (1)
File Issue
workers/wrangler/profiles.mdx line 151 Directional words — Line uses the directional word above (profile bound above it) Fix: Replace above with a direct reference such as the profile bound to an ancestor directory
Suggestions (1)
File Issue
changelog/workers/2026-06-30-wrangler-auth-profiles.mdx line 32 Use 'refer to' instead of 'see' when introducing a link — Line adds ... see [Authentication profiles](/workers/wrangler/profiles/). Fix: Change to ... refer to [Authentication profiles](/workers/wrangler/profiles/).

Redirects

No missing redirect entries found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.

Comment thread pnpm-workspace.yaml
# Wrangler often to regenerate the autogenerated command reference, so exempt
# it (and its miniflare dependency) from the 24h wait.
- wrangler
- miniflare

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we will need to include transitive dependencies of miniflare too 😅

Suggested change
- miniflare
- miniflare
- workerd
- @cloudflare/workers-types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants